'''User class'''


class User:
    '''User class'''

    id = 0
    username = ""
    age = 0
    # 私有属性
    __adress = ""

    def __init__(self, id_, name, age, addr) -> None:
        '''构造

        参数赋值:all of
        '''
        self.user_id = id_
        self.user_name = name
        self.age = age
        self.__adress = addr

    def set_address(self, addr: str):
        '''address variable setter'''
        self.__adress = addr

    def prinf_info(self):
        '''打印user数据'''
        print(f"id={self.user_id},username={self.user_name},age={self.age},address={self.__adress}")


user = User(1021, "Amy", 15, "ber road 1 street")
# print(user.__adress)
user.set_address(addr="shanghai road")
user.prinf_info()
